<?php 
class RubricsTree extends CWidget {

	public $service_type = null;
	public $rubric_id = 0;
	public $category_id = 0;
	
/*
    public function init() {
		
    }
*/	
	
    public function run() {
		$rubrics = array();
		if (null === $this->service_type) {
			$rubrics = Yii::app()->basestatic->all_rubrics;
		} else {
			$rubrics = Yii::app()->basestatic->rubrics(intval($this->service_type));
		}
        $this->render('RubricsTree',array('rubrics' => $rubrics, 
		'service_type' => $this->service_type,		
		'rubric_id' => $this->rubric_id,
		'category_id' => $this->category_id,
		));
    }
	
   
}


?>